#include <iostream>
#include <string>
using namespace std;

bool isThisPrinter(string target) {
    if (target.find('m') == string::npos && target.find('w') == string::npos) {
        return true;
    }
    return false;
}

int getStringCnt(string target) {
    if (target.length() > 1 && (target.substr(target.length() - 2, 2) == "uu"
    || target.substr(target.length() - 2, 2) == "nn")) {
        return getStringCnt(target.substr(0, target.length() - 1)) +
        getStringCnt(target.substr(0, target.length() - 2));
    }
    if (target.length() > 1) {
        return getStringCnt(target.substr(0, target.length() - 1));
    }
    else {
        return 1;
    }
}

int main() {
    string target; cin >> target;
    int result = getStringCnt(target);
    result *= isThisPrinter(target) ? 1 : 0;
    cout << result;
    return 0;
}